package com.java2_7;

import java.util.ArrayList;

public class card {

    private String name;
    private int age;

    public static ArrayList<String> cards = new ArrayList<>();


    {
        name = "coco";  //初始化
    }

    //静态代码块的初始化
    static {
        String[] str = {"3", "4", "5", "6", "7", "8", "9", "10", "J", "Q", "K", "A", "2"};
        String[] type = {"♣", "♦", "♠", "红心"};
        String s = "";
        for (int i = 0; i < str.length; i++) {
            for (int j = 0; j < type.length; j++) {
                String S = type[j] + str[i];
                cards.add(S);
            }
        }
        cards.add("小🃏");
        cards.add("大🃏");
    }


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}
